package page;

/**
 * Created by IntelliJ IDEA.
 * User: Evgeniy Krasko
 * Date: 06.11.11
 * Time: 18:46
 */
public class WikiPage {
    private final Lang lang;
    private final String title;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WikiPage wikiPage = (WikiPage) o;
        return lang == wikiPage.lang && !(title != null ? !title.equals(wikiPage.title) : wikiPage.title != null);
    }

    @Override
    public int hashCode() {
        int result = lang != null ? lang.hashCode() : 0;
        result = 31 * result + (title != null ? title.hashCode() : 0);
        return result;
    }

    public WikiPage(final Lang lang, final String title) {
        this.lang = lang;
        this.title = title;
    }

    public Lang getLang() {
        return lang;
    }

    public String getTitle() {
        return title;
    }

}
